package com.wudizaba.microservicesdemosystem.module.po;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 定时任务记录表
 * </p>
 *
 * @author wudizaba
 * @since 2024-06-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("quzrtz_jobs")
@ApiModel(value="QuzrtzJobs对象", description="定时任务记录表")
public class QuzrtzJobs implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "任务名字")
    private String jobName;

    @ApiModelProperty(value = "任务ID")
    private String jobId;

    @ApiModelProperty(value = "任务分组")
    private String jobGroup;

    @ApiModelProperty(value = "触发器id")
    private String triggerId;

    @ApiModelProperty(value = "触发器分组")
    private String triggerGroup;

    @ApiModelProperty(value = "可以是cron表达式")
    private String schedule;

    @ApiModelProperty(value = "上次执行时间")
    private LocalDateTime lastRun;

    @ApiModelProperty(value = "下次执行时间")
    private LocalDateTime nextRun;

    @ApiModelProperty(value = "任务执行状态 0 未执行、 1 已执行、2 执行成功、3 执行失败")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;


}
